package com.youlai.boot.system.service;

import com.youlai.boot.core.security.model.SysUserDetails;
import com.youlai.boot.system.model.entity.LpsOrder;
import com.youlai.boot.system.model.entity.LpsOrderDownload;
import com.youlai.boot.system.model.form.LpsOrderDownloadForm;
import com.youlai.boot.system.model.query.LpsOrderDownloadQuery;
import com.youlai.boot.system.model.vo.LpsOrderDownloadVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 下载记录服务类
 *
 * @author youlaitech
 * @since 2025-08-10 19:52
 */
public interface LpsOrderDownloadService extends IService<LpsOrderDownload> {

    /**
     *下载记录分页列表
     *
     * @return
     */
    IPage<LpsOrderDownloadVO> getLpsOrderDownloadPage(LpsOrderDownloadQuery queryParams);

    /**
     * 获取下载记录表单数据
     *
     * @param id 下载记录ID
     * @return
     */
     LpsOrderDownloadForm getLpsOrderDownloadFormData(Long id);

    /**
     * 新增下载记录
     *
     * @param formData 下载记录表单对象
     * @return
     */
    boolean saveLpsOrderDownload(LpsOrderDownloadForm formData);

    /**
     * 修改下载记录
     *
     * @param id   下载记录ID
     * @param formData 下载记录表单对象
     * @return
     */
    boolean updateLpsOrderDownload(Long id, LpsOrderDownloadForm formData);

    /**
     * 删除下载记录
     *
     * @param ids 下载记录ID，多个以英文逗号(,)分割
     * @return
     */
    boolean deleteLpsOrderDownloads(String ids);

    /**
     *
     * @param userDetails
     * @param lpsOrder
     */
    void handleLpsOrderDownload(SysUserDetails userDetails, LpsOrder lpsOrder);

    /**
     *
     * @param orderIds
     */
    void deleteByOrderIds(List<Long> orderIds);
}
